package com.aps.common.exception;

/**
 * @Author nbZhuozh
 * @Date 2025-10-14  09:27
 *
 * 排程 参数校验异常
 * code：499
 **/
public class SchedulingInvalidateException extends RuntimeException {


    public SchedulingInvalidateException() {}

    private static final Integer CODE = 499;

    public Object getData() {
        return data;
    }

    private Object data;

    public SchedulingInvalidateException(String s , Object data) {
        super(s);
        this.data = data;
    }

    public SchedulingInvalidateException(String message, Throwable cause , Object data) {
        super(message, cause);
        this.data = data;
    }
    /**
     * 获取错误码
     */
    public Integer getCode() {
        return CODE;
    }

    public static SchedulingInvalidateException of(String message) {
        return new SchedulingInvalidateException(message , null);
    }
    public static SchedulingInvalidateException of(String message , Object data) {
        return new SchedulingInvalidateException(message,data);
    }
}
